const user = {
  state: {
    userInfo: null
  },
  mutations: {
    UPDATE_USER_INFO(state, data) {
      state.userInfo = data
    }
  },
  actions: {
    getUserInfo({ commit }) {
      window.nativeHandler('getBaseInfo', {}).then(data => {
        commit('USER_INFO', data)
      })
    }
  }
}
export default user

